package 装饰者.饮料里随便加调料;

public class Decorator extends Drink{
    private Drink drink;    // 这里的drink随饮料种类的变化而变化

    public Decorator(Drink drink) {
        this.drink = drink;
    }


    @Override
    float cost() {
        return drink.cost();
    }
}
